import request from '@/utils/request'

export function homeCategoryHeadApi () {
  return request({
    url: '/home/category/head',
    method: 'get'
  })
}

// 一级类目
export function getCategory (id) {
  return request({
    url: '/category',
    method: 'get',
    params: {
      id
    }
  })
}

// 二级类目-筛选条件-PC
export function categorySubFilter (id) {
  return request({
    url: '/category/sub/filter',
    method: 'get',
    params: {
      id
    }
  })
}

// 分类查询
export function categoryGoods (data) {
  return request({
    url: '/category/goods',
    method: 'post',
    data
  })
}
